local function MakeSpice(name)
    local assets =
    {
        Asset("ANIM", "anim/tf_spices.zip"),
    }
    local function fn()
        local inst = CreateEntity()

        inst.entity:AddTransform()
        inst.entity:AddAnimState()
        inst.entity:AddNetwork()

        MakeInventoryPhysics(inst)

        inst.AnimState:SetBank("tf_spices")
        inst.AnimState:SetBuild("tf_spices")
        inst.AnimState:PlayAnimation("idle")
        inst.AnimState:OverrideSymbol("swap_spice", "tf_spices", name)

        inst:AddTag("spice")

        MakeInventoryFloatable(inst, "med", nil, 0.7)

        if name == "spice_tf_coffee_powder" then
            inst:AddComponent("tf_dusting")
        end

        inst.entity:SetPristine()

        if not TheWorld.ismastersim then
            return inst
        end

        inst:AddComponent("stackable")
        inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM

        inst:AddComponent("inspectable")
        inst:AddComponent("inventoryitem")
        -- if name == "spice_tf_coffee_powder" then
        --     inst:AddComponent("tf_dusting")
        -- end

        MakeHauntableLaunch(inst)

        return inst
    end

    return Prefab(name, fn, assets)
end

return
    MakeSpice("spice_tf_konpeito"),
    MakeSpice("spice_tf_sunny_side_up_egg"),
    MakeSpice("spice_tf_popping_candy"),
    MakeSpice("spice_tf_takoyaki"),
    MakeSpice("spice_tf_durian_candy"),
    MakeSpice("spice_tf_dressing"),
    MakeSpice("spice_tf_mayonnaise"),
    MakeSpice("spice_tf_mustard"),
    MakeSpice("spice_tf_sweet_chili_sauce"),
    MakeSpice("spice_tf_tomato_sauce"),
    MakeSpice("spice_tf_coffee_powder"),
    MakeSpice("spice_tf_bacon_bits"),
    MakeSpice("spice_tf_orange_jam"),
    MakeSpice("spice_tf_strawberry_jam"),
    MakeSpice("spice_tf_protein_powder"),
    MakeSpice("spice_tf_kimchi_powder")
